<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="">
	<%@ include file="include/style.jsp" %>
	<link rel="stylesheet" href="../css/bootstrap.min.css">
</head>
<body>
	
	
	
	<!-- 头部 -->
	<%@ include file="include/top.jsp"%>
	
	<!-- 收藏宝贝时弄出来的窗口 -->
		<%--<div id="myModal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		  <div class="modal-header">
		    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		    <h3 id="myModalLabel">收藏成功！！</h3>
		  </div>
		  <div class="modal-footer">
		    
		    <button class="btn btn-primary">查看收藏的宝贝</button>
		    <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
		  </div>
		</div>
	--%>
	
	
	<div >
		
		<ul class="breadcrumb" style="height:20px;background-color:#1E2537;border-radius: 0px;margin-bottom:0px;">
			<div id="" class="container">
				 <li><a href="index.jspx">Home</a> <span class="divider">/</span></li>
				 
			</div>
		 
		</ul>
	</div>
	

	<!--分割-->

			<div class="con">
				<div class="container" style="">
		
		 <div style="border:2px solid #D1CCC7;border-bottom:none;margin-top:10px;">

		 	<div class="fenlei1" style="height:70px">
		 		<p style="margin-top:20px;margin-left:10px;color:#B0A59F;font-weight:bold;">读书分类</p>
		 		
		 			
		 		
		 	</div>
		 	<div class="top_right" style="height:70px;overflow: hidden;">
				<div class="fenlei2">
					<c:forEach items="${requestScope.listtype }" var="s">
						<a href="typebooklist.jspx?id=${s.id }">${s.typename }</a>
					</c:forEach>
					
					
					<a href="" style="background-color:#999;height:15px;width:15px;margin-left:60px;px;color:#fff"><i class="icon-plus icon-white"></i>更多</a>
				</div>
				
				
			</div>
		 </div>

		 <div style="border:2px solid #D1CCC7;border-top:1px dashed  #D1CCC7;border-bottom:none;margin-top:0px;">

		 	<div class="fenlei1" style="height:35px;">
		 		<p style="margin-top:10px;margin-left:10px;color:#B0A59F;font-weight:bold;">作者</p>
		 		
		 			
		 		
		 	</div>
		 	<div class="top_right" style="height:35px;overflow: hidden;">
				<div class="fenlei2">
					<a href="#">唐家三少</a>
					<a href="#">我吃西红柿</a>
					<a href="#">萧鼎</a>
					<a href="#">郭敬明</a>
					<a href="#">杀神</a>
					<a href="#">辰东</a>
					
					<a href="" style="background-color:#999;height:15px;width:15px;margin-left:60px;color:#fff"><i class="icon-plus icon-white"></i>更多</a>
				</div>
				
				
			</div>
		 </div>

		  <div style="border:2px solid #D1CCC7;border-top:1px dashed  #D1CCC7;margin-top:0px;">

		 	<div class="fenlei1" style="height:35px;">
		 		<p style="margin-top:10px;margin-left:10px;color:#B0A59F;font-weight:bold;">出版社</p>
		 		
		 			
		 		
		 	</div>
		 	<div class="top_right" style="height:35px;overflow: hidden;">
				<div class="fenlei2">
					<c:forEach items="${listpublish }" var="s">
						<a href="publishbooklist.jspx?id=${s.id }">${s.publishname }</a>
					</c:forEach>	
					<a href="" style="background-color:#999;height:15px;width:15px;margin-left:60px;color:#fff"><i class="icon-plus icon-white"></i>更多</a>
				</div>
				
				
			</div>
		 </div>

	</div>







	<!--这边是下面的东西了-->
	<hr style="margin:10px;"/>

	<!--广告-->
	<div class="container">
		<div class="mydiv">
			<div class="mydiv" id="mydiv1" style="display:block">
				<a href="" title=""><img src="../img/ad/1.jpg"></a>
			</div>
			<div class="mydiv" id="mydiv2" style="display:none">
				<a href="" title=""><img src="../img/ad/2.jpg"></a>
			</div>
			<div class="mydiv" id="mydiv3" style="display:none">
				<a href="" title=""><img src="../img/ad/3.jpg"></a>
			</div>
			<div class="mydiv" id="mydiv4" style="display:none">
				<a href="" title=""><img src="../img/ad/4.jpg"></a>
			</div>
			<div class="mydiv" id="mydiv5" style="display:none">
				<a href="" title=""><img src="../img/ad/5.jpg"></a>
			</div>
			<div id="mya">
				<a href="" title="">1</a>
				<a href="" title="">2</a>
				<a href="" title="">3</a>
				<a href="" title="">4</a>
				<a href="" title="">5</a>
				<div class="clear">
					
				</div>
			</div>
		</div>
		<div class="span3" style="height:290px;float:right;margin-left:0px; border:1px solid #999;">
			<div >
				<div class="pai">
					<font style="color:#8C191E;font-weight:bold;margin-top:5px;"><i class="icon-signal"></i>销售排行榜</font>
				</div>
				<ul class="paihang" >
					<li><a href="" title=""><span class="label label-warning">1</span>Head First HTML5(中文版)</a></li>
					<li><a href="" title=""><span class="label label-success">2</span>数学之美</a></li>
					<li><a href="" title=""><span class="label label-important">3</span>C++ Primer中文版</a></li>
					<li><a href="" title=""><span class="label">4</span>Head First HTML5(中文版)</a></li>
					<li><a href="" title=""><span class="label">5</span>数学之美</a></li>
					<li><a href="" title=""><span class="label">6</span>C++ Primer中文版</a></li>
					<li><a href="" title=""><span class="label">7</span>Head First HTML5(中文版)</a></li>
					<li><a href="" title=""><span class="label">8</span>Head First HTML5(中文版)</a></li>
					<li><a href="" title=""><span class="label">9</span>Head First HTML5(中文版)</a></li>
					<li><a href="" title=""><span class="label">10</span>Head First HTML5(中文版)</a></li>
				</ul>
			</div>
			
		</div>
	</div>





	<div class="container" style="margin-top:10px;">
		<div class="span12" style="margin-left:0px;">
			<ul class="thumbnails" >
			
			
			<c:forEach items="${page.list }" var="s" varStatus="vs">
				<li class="span3" style="border:none">
	                <div class="thumbnail" style="border:none">
	                  <img src="showimg.img?n=${s.pic }" alt="" width="130" height="130">
	                  <div class="caption">
	                    <h4><a href="showbook.jspx?id=${s.id }" title="" style="color:#555555">${s.bookname }</a></h4>
	                    <p>定价：<span class="muted lt">￥${s.price }</span><br/>
								<em class="tb-promo-price-type">促销价：</em>
								<strong class="tb-rmb-num" style="font-weight: 700;"><em class="tb-rmb" style="color:#999;font-style: normal;">¥</em>${s.salesprice }</strong> <span class="add"></span></p>
	                    
	                   
	                    <a href="shopcar.jspx?id=${s.id }" class="btn btn-primary"><i class="icon-shopping-cart icon-white"></i>加入购物车</a>
	                    <a href="javascript:;"  rel="${s.id }" role="button"  class="testa btn" data-toggle="modal"><i class="icon-tags"></i>收藏</a> 
	                    
	                  </div>
	                </div>
	              </li>
			</c:forEach>	
              


              
              
              
            </ul>
		</div>
		
	</div>
	
	
	<div class="pagination" style="float:right;margin-right:30px;">
			  <ul>
								  	<c:choose>
								  		<c:when test="${page.nowPageNum == 1 }">
								  			<li class="disabled"><a href="#">首页</a></li>
								  		</c:when>
								  		<c:otherwise>
								  			<li><a href="index.jspx?p=1">首页</a></li>
								  		</c:otherwise>
								  	</c:choose>
								  	
							<c:forEach items="${solid }" var="s">
									<c:choose>
										<c:when test="${page.nowPageNum == s }">
											<li class="disabled"><a href="#">${s }</a></li>
										</c:when>
										<c:otherwise>
											<li><a href="index.jspx?p=${s }">${s }</a></li>
										</c:otherwise>					
									</c:choose>
							</c:forEach>
									<c:choose>
										<c:when test="${page.nowPageNum == page.totalpage}">
											<li class="disabled"><a href="#">尾页</a></li>
										</c:when>
										<c:otherwise>
											<li><a href="index.jspx?p=${page.totalpage }">尾页</a></li>
										</c:otherwise>
									</c:choose>
									
							 	</ul>
			</div>
		<div class="clear">
			
		</div>

			</div>


	<!--butom-->
	
		<%@ include file="include/bottom.jsp" %>



	<c:if test=""></c:if>
	

	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script type="text/javascript">
		(function(){
			<c:if test="${not empty favmessage}">
				alert("${favmessage}");
				<%
				session.removeAttribute("favmessage");
				%>
			</c:if>
			
			var count = 0;
			var now = 1;
			var st = null;
			var as = document.getElementById("mya").childNodes;
			function timechange(){
				for(var count = 1;count <= 5 ;count++){
					if (now == count) {
						document.getElementById("mydiv"+now).style.display = "block";
						//as[now].onmouseover;
					}else{
						document.getElementById("mydiv"+count).style.display = "none";
					}
				}
				now++;
				if (now > 5) {
					now=1;
				};

				st = setTimeout(timechange,2000);

			}
			
			timechange();

			

			for(var index in as){
				as[index].onmouseover = changeAd;
				as[index].onmouseout = timechange;
			}

			function changeAd(){
				clearTimeout(st);
				now = this.innerHTML;
				for(var count = 1;count <= 5 ;count++){
					if (now == count) {
						document.getElementById("mydiv"+now).style.display = "block";
					}else{
						document.getElementById("mydiv"+count).style.display = "none";
					}
				}
			}
			$(".testa").click(function(){
				var id = $(this).attr("rel");
				
				location.href = "favbook.jspx?to=favbook.jspx&go=index.jspx&id="+id;
			});
			
			
			
		})();

	</script>
</body>
</html>